package com.util;

import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.Insets;

import javax.swing.border.Border;

public class MyBorder implements Border {
   private Color color;
   
   
	public MyBorder(Color color) {
	super();
	this.color = color;
}
    public MyBorder(){
    	this.color = Color.black;
    }
	@Override
	public void paintBorder(Component c, Graphics g, int x, int y, int width,
			int height) {
       c.setForeground(color);
       g.drawRoundRect(0,0,c.getWidth()-1,c.getHeight()-1, 15, 15);
	}

	@Override
	public Insets getBorderInsets(Component c) {
		// TODO Auto-generated method stub
		return new Insets(0, 0, 0, 0);
	}

	@Override
	public boolean isBorderOpaque() {
		// TODO Auto-generated method stub
		return false;
	}

}
